<!DOCTYPE html>
<html>
<head>
  <title>Vector Web App</title>
  <link rel="stylesheet" type="text/css" href="../css/style.css">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="https://kit.fontawesome.com/8cdc8cbed9.js" crossorigin="anonymous"></script>
</head>
<body>


  <div id="outer">
    <div id="content">
      <h1 class="center">Vector control (beta)</h1>
      <hr>
      <div class="main-nav-parent">
        <div class="main-nav-child"><a href="#" onclick="goBackToSettings()""><i class="fa-solid fa-reply"></i><br/>Back</a></div>
      </div>
      <hr>

      <div id=sdkActions>
        <h2 class="center">Camera Feed</h2>
        <div class="center" id="camStream"></div>
	<div class="center">
          <button onclick="showCamStream()">Begin Camera Stream</button>
          <button onclick="stopCamStream()">Stop Camera Stream</button>
	</div>
      <hr>

      <h2 class="center">Behavior Control</h2>
      <small class="center">You must assume behavior control before performing any action</small>
      <div class="center">
        <button onclick="sendForm('/api-sdk/assume_behavior_control?priority=high')" type="submit">Assume</button>
        <button onclick="sendForm('/api-sdk/release_behavior_control')" type="submit">Release</button>
      </div>
      <hr>

      <h2 class="center">Move Motors</h2>
      <div class="center">
        <button onclick="toggleKeyboard()" type=submit">Toggle Keyboard Controls (unstable)</button></li>
      </div>
      <div id="keysKey"><small class="center">Enabled! WASD for wheels, R-lift up, F-lift down, T-head up, G-head down</small></div>
      <hr>

      <h2 class="center">Mirror Mode</h2>
      <div class="center">
        <button onclick="sendForm('/api-sdk/mirror_mode?enable=true')" type=submit">Mirror Mode On</button>
        <button onclick="sendForm('/api-sdk/mirror_mode?enable=false')" type=submit">Mirror Mode Off</button>
      </div>
      <hr>
      <h2 class="center">Say Text</h2>
      <div class="center">
        <div class="center">
          <input class="tinput" name="textSay" id="textSay" type="text" placeholder="Put text here">
        </div>
          <button onclick="sayText()" type="submit">Submit</button>
      </div>
    </div>
  </div>

</div>

<script src="./js/httprequest.js"></script>
<script src="./js/iro.min.js"></script>
<script src="./js/control.js"></script>
<iframe name="hiddenFrame" width="0" height="0" border="0" style="display: none;"></iframe>

</body>
</html>
